﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="BangTinNhan.aspx.cs" Inherits="Content_View_Admin_HienThiTuVung" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
    <script type="text/javascript" language="javascript">
function DeleteConfirmation()
{
    if(confirm("Có Chắc bạn muốn xóa?")==true)
   return true;
   else
   return false;
}
function setAll ( e ) {
        var form = document.forms [ 0 ];
        var eState = e.checked;
        for ( i = 0; i < form.length; i++ ) {
            e = form.elements [ i ];

            if ( e.name.indexOf ( "CheckBox1" ) > -1 ) {
            e.checked = eState;
            }
        }
    }
</script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form id="form1" runat="server">
    <br />
    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0" 
        onactiveviewchanged="MultiView1_ActiveViewChanged">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="GVBangTin" runat="server" AutoGenerateColumns="False" 
                BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" 
                DataKeyNames="MaTin" onrowediting="GVBangTin_RowEditing">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input ID="CheckHet" runat="server" onclick="setAll( this )" type="checkbox" />
                            <span style="color:White; font-weight:bold">Chọn hết</span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox" runat="server" />
                        </ItemTemplate>
                        <ControlStyle ForeColor="White" />
                        <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                            BorderWidth="1px" ForeColor="White" />
                        <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                            BorderWidth="1px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="MaTK" HeaderText="Người Gửi">
                    <ControlStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <FooterStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" ForeColor="White" />
                    <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NgayGui" HeaderText="Ngày Gửi">
                    <FooterStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" ForeColor="White" />
                    <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MaTK1" HeaderText="Người Nhận">
                    <FooterStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" ForeColor="White" />
                    <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="NgayNhan" HeaderText="Ngày Nhận">
                    <FooterStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" ForeColor="White" />
                    <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="TinhTrang" HeaderText="Tình Trạng">
                    <FooterStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" ForeColor="White" />
                    <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" />
                    </asp:BoundField>
                    <asp:CommandField DeleteText="Xóa" ShowDeleteButton="True">
                    <FooterStyle BorderColor="#333333" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="#6666FF" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" ForeColor="White" />
                    <ItemStyle BackColor="White" BorderColor="#333333" BorderStyle="Solid" 
                        BorderWidth="1px" />
                    </asp:CommandField>
                    <asp:CommandField EditText="Sua" ShowEditButton="True" />
                </Columns>
            </asp:GridView>
            <br />
            <asp:Button ID="Button3" runat="server" Text="Xoa het" />
            <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Them Moi</asp:LinkButton>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table class="style1">
                <tr>
                    <td>
                        <asp:FormView ID="FormView1" runat="server" 
                            onitemcommand="FormView1_ItemCommand">
                            <ItemTemplate>
                                <table class="style1">
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label1" runat="server" Text="Nguoi Gui"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("MaTK") %>'></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label2" runat="server" Text="NguoiNhan"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("MaTK1") %>'></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            <asp:Button ID="Button2" runat="server" CommandName="update" Height="23px" 
                                                onclick="Button2_Click" Text="Update" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click">Back to List</asp:LinkButton>
                                        </td>
                                        <td>
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:FormView>
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="View3" runat="server">
            <table class="style1">
                <tr>
                    <td>
                        Bang Them Moi</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
    <br />
    <br />
    <br />
    </form>
</asp:Content>

